/*
 * @Author: silas 
 * @Date: 2021-03-26 09:11:19 
 * @Last Modified by: silas
 * @Last Modified time: 2021-04-02 17:13:26
 */

<template>
    <div class="tobBtoC">
        <el-tabs v-model="activeName" @tab-click="handleClick" ref="tabs">
            <el-tab-pane label="光网-滚投下达" name="first">
                <tab1 ref="tab1"></tab1>
            </el-tab-pane>
            <el-tab-pane label="规模系数设定" name="second">
                <tab2 ref="tab2"></tab2>
            </el-tab-pane>
             <el-tab-pane label="工程数据导入" name="third">
                <tab3 ref="tab3"></tab3>
            </el-tab-pane>
        </el-tabs>
    </div>
</template>

<script>
import prefixAPI from "@/api/prefixAPI";
import { getCookie } from "@/common/js/cookie";
import { getSessionStorage } from "@/common/js/storage";
import { $budgetAPI } from "@/api";
import tab1 from "./tab1-roll-1";
import tab2 from "./tab2-scale";
import tab3 from "./tab3-api";
export default {
    name: "lightEva",
      components: {
        tab1,
        tab2,
        tab3
    },
    mounted () {
        var that = this;
        
        if(that.activeName == 'first') {
            that.$refs.tab1.init();
        }
        if(that.$route.query && that.$route.query.type == 'second') {
            that.activeName = 'second'
            that.$refs.tab2.init();
        }
        if(that.$route.query && that.$route.query.type == 'third') {
            that.activeName = 'third'
            that.$refs.tab3.init();
        };
    },
    data() {
        return {
          form: {
                time: "",
            },
            tableData: [],
            tableLoading: false,
            activeName: "first",
        };
    },
    methods: {
		handleClick(tab, event) {
            var that = this;

            if (tab.name == "first") {
                that.$refs.tab1.init();
            }
            if (tab.name == "second") {
                that.$refs.tab2.init();
            }
            if (tab.name == "third") {
                that.$refs.tab3.init();
            }
        },
    },
};
</script>

<style lang="scss" scoped>
    .remark {
        padding-top: 5px;
        text-align: left;
        .attention {
            font-weight: bold;
        }
        
    }
    .table-content {
        .table-header {
            display: flex;
            justify-content: space-between;
            .table-title {
                font-size: 14px;
                font-weight: bold;
                height: 30px;
                line-height: 30px;
                span {
                    display: inline-block;
                    width: 5px;
                    height: 5px;
                    background-color: #418ee9;
                    border-radius: 1000%;
                    overflow: hidden;
                    margin-right: 10px;
                    margin-bottom: 3px;
                }
            }
        }
        .content {  
            margin-top: 15px;
        }
    }
</style>
